完美二叉树:一种二叉树结构,其中所有内部节点都有且只有两个子节点,并且所有叶子节点都在同一层(同一深度)。因此,它的每一层都是“满”的,节点数呈严格的 (2^k) 增长。(在数据结构语境中常与 full binary tree、complete binary tree 区分。)
/ˈpɝːfɪkt ˈbaɪnəri triː/
A perfect binary tree has all leaves at the same depth.
完美二叉树的所有叶子节点都在同一深度。
In a perfect binary tree of height (h), the total number of nodes is (2^{h+1}-1), which makes it convenient for analyzing worst-case performance in tree algorithms.
高度为 (h) 的完美二叉树总节点数是 (2^{h+1}-1),这使得它在分析树算法的最坏情况性能时很方便。
perfect 源自拉丁语 perfectus(“完成的、完善的”),在此引申为“结构上完全符合定义、没有缺口”。binary 来自拉丁语 bini(“两个一组”),表示“二元/二叉”。tree 在计算机科学中借用自然界“树”的分叉形象来描述层级结构。合在一起,perfect binary tree 就是“结构上完全规整、每层都满、叶子同层的二叉树”。